package com.bluefish.bltuan.tools;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class FormatUtils {

	private FormatUtils(){
		
	}
	
	public static boolean isEmail(String email){
		String check = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
	    Pattern regex = Pattern.compile(check);
        Matcher matcher = regex.matcher(email);
        boolean isMatched = matcher.matches();
        return isMatched;
	}
}
